Optimal. Leaf size=48 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a}}\right )}{2 a^{3/2} \sqrt{b}}+\frac{\sin (x)}{2 a \left (a+b \sin ^2(x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0348803, antiderivative size = 48, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {3190, 199, 205} \[ \frac{\tan ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a}}\right )}{2 a^{3/2} \sqrt{b}}+\frac{\sin (x)}{2 a \left (a+b \sin ^2(x)\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3190
Rule 199
Rule 205
Rubi steps
\begin{align*} \int \frac{\cos (x)}{\left (a+b \sin ^2(x)\right )^2} \, dx &=\operatorname{Subst}\left (\int \frac{1}{\left (a+b x^2\right )^2} \, dx,x,\sin (x)\right )\\ &=\frac{\sin (x)}{2 a \left (a+b \sin ^2(x)\right )}+\frac{\operatorname{Subst}\left (\int \frac{1}{a+b x^2} \, dx,x,\sin (x)\right )}{2 a}\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a}}\right )}{2 a^{3/2} \sqrt{b}}+\frac{\sin (x)}{2 a \left (a+b \sin ^2(x)\right )}\\ \end{align*}
Mathematica [A] time = 0.0582955, size = 48, normalized size = 1. \[ \frac{\tan ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a}}\right )}{2 a^{3/2} \sqrt{b}}+\frac{\sin (x)}{2 a \left (a+b \sin ^2(x)\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.035, size = 39, normalized size = 0.8 \begin{align*}{\frac{\sin \left ( x \right ) }{2\,a \left ( a+b \left ( \sin \left ( x \right ) \right ) ^{2} \right ) }}+{\frac{1}{2\,a}\arctan \left ({\sin \left ( x \right ) b{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.02593, size = 381, normalized size = 7.94 \begin{align*} \left [-\frac{2 \, a b \sin \left (x\right ) +{\left (b \cos \left (x\right )^{2} - a - b\right )} \sqrt{-a b} \log \left (-\frac{b \cos \left (x\right )^{2} + 2 \, \sqrt{-a b} \sin \left (x\right ) + a - b}{b \cos \left (x\right )^{2} - a - b}\right )}{4 \,{\left (a^{2} b^{2} \cos \left (x\right )^{2} - a^{3} b - a^{2} b^{2}\right )}}, -\frac{a b \sin \left (x\right ) -{\left (b \cos \left (x\right )^{2} - a - b\right )} \sqrt{a b} \arctan \left (\frac{\sqrt{a b} \sin \left (x\right )}{a}\right )}{2 \,{\left (a^{2} b^{2} \cos \left (x\right )^{2} - a^{3} b - a^{2} b^{2}\right )}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 31.5219, size = 340, normalized size = 7.08 \begin{align*} \begin{cases} \frac{\tilde{\infty }}{\sin ^{3}{\left (x \right )}} & \text{for}\: a = 0 \wedge b = 0 \\\frac{\sin{\left (x \right )}}{a^{2}} & \text{for}\: b = 0 \\- \frac{1}{3 b^{2} \sin ^{3}{\left (x \right )}} & \text{for}\: a = 0 \\\frac{2 i \sqrt{a} b \sqrt{\frac{1}{b}} \sin{\left (x \right )}}{4 i a^{\frac{5}{2}} b \sqrt{\frac{1}{b}} + 4 i a^{\frac{3}{2}} b^{2} \sqrt{\frac{1}{b}} \sin ^{2}{\left (x \right )}} + \frac{a \log{\left (- i \sqrt{a} \sqrt{\frac{1}{b}} + \sin{\left (x \right )} \right )}}{4 i a^{\frac{5}{2}} b \sqrt{\frac{1}{b}} + 4 i a^{\frac{3}{2}} b^{2} \sqrt{\frac{1}{b}} \sin ^{2}{\left (x \right )}} - \frac{a \log{\left (i \sqrt{a} \sqrt{\frac{1}{b}} + \sin{\left (x \right )} \right )}}{4 i a^{\frac{5}{2}} b \sqrt{\frac{1}{b}} + 4 i a^{\frac{3}{2}} b^{2} \sqrt{\frac{1}{b}} \sin ^{2}{\left (x \right )}} + \frac{b \log{\left (- i \sqrt{a} \sqrt{\frac{1}{b}} + \sin{\left (x \right )} \right )} \sin ^{2}{\left (x \right )}}{4 i a^{\frac{5}{2}} b \sqrt{\frac{1}{b}} + 4 i a^{\frac{3}{2}} b^{2} \sqrt{\frac{1}{b}} \sin ^{2}{\left (x \right )}} - \frac{b \log{\left (i \sqrt{a} \sqrt{\frac{1}{b}} + \sin{\left (x \right )} \right )} \sin ^{2}{\left (x \right )}}{4 i a^{\frac{5}{2}} b \sqrt{\frac{1}{b}} + 4 i a^{\frac{3}{2}} b^{2} \sqrt{\frac{1}{b}} \sin ^{2}{\left (x \right )}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.15537, size = 51, normalized size = 1.06 \begin{align*} \frac{\arctan \left (\frac{b \sin \left (x\right )}{\sqrt{a b}}\right )}{2 \, \sqrt{a b} a} + \frac{\sin \left (x\right )}{2 \,{\left (b \sin \left (x\right )^{2} + a\right )} a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]